package cn.well.cloud.modular.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhh
 * @since 2020-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sn_user")
@ApiModel(value="User对象", description="用户表")
public class User extends Model<User> {

    private static final long serialVersionUID=1L;

    @TableId(value = "user_id", type = IdType.ID_WORKER)
    private Long userId;

    @ApiModelProperty(value = "openId")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty(value = "姓名")
    @TableField("nick_name")
    private String nickName;

    @ApiModelProperty(value = "头像")
    @TableField("head_url")
    private String headUrl;

    @ApiModelProperty(value = "公司")
    @TableField("company")
    private String company;

    @ApiModelProperty(value = "工号")
    @TableField("job_number")
    private String jobNumber;

    @ApiModelProperty(value = "部门")
    @TableField("department")
    private String department;

    @ApiModelProperty(value = "时间")
    @TableField("create_date")
    private Date createDate;

    @ApiModelProperty(value = "积分")
    @TableField("integral")
    private Integer integral;

    @ApiModelProperty(value = "手机号")
    @TableField("cellphone")
    private String cellphone;

    @ApiModelProperty(value = "unionid")
    @TableField("unionid")
    private String unionid;

    @ApiModelProperty(value = "session_key")
    @TableField("session_key")
    private String sessionKey;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
